Page({
  data:{
    time:0,
    setInterval:null
  },
  onReady() {
    // this.videoCtx = wx.createVideoContext('myVideo')
  },
  play() {
    if (this.data.setInterval) return;
    this.data.setInterval = setInterval(()=>{
      this.setData({ time: ++this.data.time })
    },1000);
    this.setData({ setInterval: this.data.setInterval })
    this.videoCtx.play();
  },
  pause() {
    console.log(this.data.setInterval)
    if (!this.data.setInterval) return;
    clearInterval(this.data.setInterval);
    this.setData({ setInterval: null})
    this.videoCtx.pause();
  },
  start() {
    console.log('test3333')
    if (this.data.setInterval) return;
    this.data.setInterval = setInterval(() => {
      this.setData({ time: ++this.data.time })
    }, 1000);
    this.setData({ setInterval: this.data.setInterval})
  }
})